***

**NOTE: STATA CODE FILE FOR "WHAT DRIVES PEOPLE TO BELIEVE IN ZIKA CONSPIRACY THEORIES"***

***


*GET DATA

clear
use "/CASEY/UM_drive/data/2016 CCES/initial data delivery/CCES16_MIA_OUTPUT_Feb2017.dta"

*OVERALL CONCERN
	*summary
		*recode to run low to high
generate zikaconcern=.
replace zikaconcern=1 if MIA438==5
replace zikaconcern=2 if MIA438==4
replace zikaconcern=3 if MIA438==3
replace zikaconcern=4 if MIA438==2
replace zikaconcern=5 if MIA438==1
tab MIA438 zikaconcern [aweight=weight]
summarize zikaconcern [aweight=weight]
tab zikaconcern [aweight=weight]
	
*PERCEIVED CAUSES
	*recode to 0 = no 1 = yes
		*vaccines
generate z_vac=.
replace z_vac=1 if MIA440_1==1
replace z_vac=0 if MIA440_1==2
		*GMMs
generate z_gmm=.
replace z_gmm=1 if MIA440_2==1
replace z_gmm=0 if MIA440_2==2
		*government
generate z_govt=.
replace z_govt=1 if MIA440_3==1
replace z_govt=0 if MIA440_3==2
		*olympics
generate z_oly=.
replace z_oly=1 if MIA440_4==1
replace z_oly=0 if MIA440_4==2
		*big pharama
generate z_pharm=.
replace z_pharm=1 if MIA440_5==1
replace z_pharm=0 if MIA440_5==2
		*terrorists
generate z_terror=.
replace z_terror=1 if MIA440_6==1
replace z_terror=0 if MIA440_6==2
		*none of the above
generate z_none=.
replace z_none=1 if MIA440_7==1
replace z_none=0 if MIA440_7==2
	
	*summary
summarize z_vac z_gmm z_govt z_oly z_pharm z_terror z_none  [aweight=weight]

	*total count variable
generate zikacount=0
replace zikacount=z_vac+z_gmm+z_govt+z_oly+z_pharm+z_terror
tab zikacount [aweight=weight]
summarize zikacount [aweight=weight]

*CREATE CONSPIRACY VARIABLE
	*recode all variables to run low-high on conspiratorial beliefs
		*"Much of our lives are being controlled by plots hatched in secret places"
generate plots=.
replace plots=1 if MIA342a==5
replace plots=2 if MIA342a==4
replace plots=3 if MIA342a==3
replace plots=4 if MIA342a==2
replace plots=5 if MIA342a==1
tab MIA342a plots
		*"Even though we live in a democracy, a few people will always run things anyway"
generate few_people=.
replace few_people=1 if MIA342b==5
replace few_people=2 if MIA342b==4
replace few_people=3 if MIA342b==3
replace few_people=4 if MIA342b==2
replace few_people=5 if MIA342b==1
tab MIA342b few_people
		*"The people who really 'run' the country, are not known to the voters"
generate not_known=.
replace not_known=1 if MIA342c==5
replace not_known=2 if MIA342c==4
replace not_known=3 if MIA342c==3
replace not_known=4 if MIA342c==2
replace not_known=5 if MIA342c==1
tab MIA342c not_known
		*"Big events ... are controlled by small groups of people who are working in secret against the rest of us"
generate big_events=.
replace big_events=1 if MIA344b==5
replace big_events=2 if MIA344b==4
replace big_events=3 if MIA344b==3
replace big_events=4 if MIA344b==2
replace big_events=5 if MIA344b==1
tab MIA344b big_events
	*run pca
factor plots few_people not_known big_events [aweight=weight], pcf
rotate
	*get and save PC1 scores as a new variable (factor1)
predict factor1
summarize factor1
	*rescale factor1 to run 0-1 into new variable (consp_beliefs), where 0 = least and 1 = most conspiratorial
generate consp_beliefs=(factor1-(-2.951893 ))/(2.03734 - (-2.951893 ))
summarize consp_beliefs  [aweight=weight]
tabstat consp_beliefs [aweight=weight], stats(mean sd semean min max n)
pwcorr factor1 consp_beliefs [aweight=weight], sig

*VALIDATE CONSPIRACY VARIABLE
	*get count of "groups working in secret"
		*MIA345_1
generate cgroup1=.
replace cgroup1=1 if MIA345_1==1
replace cgroup1=0 if MIA345_1==2
tab MIA345_1 cgroup1
		*MIA345_2
generate cgroup2=.
replace cgroup2=1 if MIA345_2==1
replace cgroup2=0 if MIA345_2==2
tab MIA345_2 cgroup2
		*MIA345_3
generate cgroup3=.
replace cgroup3=1 if MIA345_3==1
replace cgroup3=0 if MIA345_3==2
tab MIA345_3 cgroup3
		*MIA345_4
generate cgroup4=.
replace cgroup4=1 if MIA345_4==1
replace cgroup4=0 if MIA345_4==2
tab MIA345_4 cgroup4
		*MIA345_5
generate cgroup5=.
replace cgroup5=1 if MIA345_5==1
replace cgroup5=0 if MIA345_5==2
tab MIA345_5 cgroup5
		*MIA345_6
generate cgroup6=.
replace cgroup6=1 if MIA345_6==1
replace cgroup6=0 if MIA345_6==2
tab MIA345_6 cgroup6
		*MIA345_7
generate cgroup7=.
replace cgroup7=1 if MIA345_7==1
replace cgroup7=0 if MIA345_7==2
tab MIA345_7 cgroup7
		*MIA345_8
generate cgroup8=.
replace cgroup8=1 if MIA345_8==1
replace cgroup8=0 if MIA345_8==2
tab MIA345_8 cgroup8
		*MIA345_9
generate cgroup9=.
replace cgroup9=1 if MIA345_9==1
replace cgroup9=0 if MIA345_9==2
tab MIA345_9 cgroup9
		*MIA345_10
generate cgroup10=.
replace cgroup10=1 if MIA345_10==1
replace cgroup10=0 if MIA345_10==2
tab MIA345_10 cgroup10
	*create total count
generate ccount=.
replace ccount=cgroup1+cgroup2+cgroup3+cgroup4+cgroup5+cgroup6+cgroup7+cgroup8+cgroup9+cgroup10
tab ccount
	*correlate count with conspiracy measure
pwcorr consp_beliefs ccount [aweight=weight], sig

*RECODE PID TO CLEAN UP MISSING CASES
generate dem_rep=.
replace dem_rep=1 if pid7==1
replace dem_rep=2 if pid7==2
replace dem_rep=3 if pid7==3
replace dem_rep=4 if pid7==4
replace dem_rep=5 if pid7==5
replace dem_rep=6 if pid7==6
replace dem_rep=7 if pid7==7
tab dem_rep 
tab pid7 
tabstat dem_rep [aweight=weight], stats(mean sd semean min max n)

*DESCRIPTIVES ON ED
tabstat educ [aweight=weight], stats(mean sd semean min max n)

*RECODE KIDS IN FUTURE
generate kidsinfuture=.
replace kidsinfuture=1 if MIA441==1
replace kidsinfuture=0 if MIA441==2
tab MIA441  
tab kidsinfuture
tabstat kidsinfuture [aweight=weight], stats(mean sd semean min max n)  

*RECODE GENDER
generate female=.
replace female=1 if gender==2
replace female=0 if gender==1
tab female  
tab gender
tabstat female [aweight=weight], stats(mean sd semean min max n) 

*DESCRIPTIVES ON BIRTH YEAR
tabstat birthyr [aweight=weight], stats(mean sd semean min max n)

*RECODE IMP RELIGION
generate religious=.
replace religious=1 if pew_religimp==4
replace religious=2 if pew_religimp==3
replace religious=3 if pew_religimp==2
replace religious=4 if pew_religimp==1
tab pew_religimp
tab religious
tabstat religious [aweight=weight], stats(mean sd semean min max n)

*RECODE NO HEALTH INSURANCE
generate noinsurance=.
replace noinsurance=1 if healthins_6==1
replace noinsurance=0 if healthins_6==2
tab noinsurance
tab healthins_6
tabstat noinsurance [aweight=weight], stats(mean sd semean min max n)

*CREATE NUMBER OF ZIKA CASES BY STATE MEASURE (03/09/17)
generate zikacases=.
replace zikacases=0 if inputstate==2
replace zikacases=38 if inputstate==1
replace zikacases=55 if inputstate==4
replace zikacases=15 if inputstate==5
replace zikacases=426 if inputstate==6
replace zikacases=55 if inputstate==8
replace zikacases=58 if inputstate==9
replace zikacases=17 if inputstate==10
replace zikacases=31 if inputstate==11
replace zikacases=1083 if inputstate==12
replace zikacases=109 if inputstate==13
replace zikacases=16 if inputstate==15
replace zikacases=5 if inputstate==16
replace zikacases=94 if inputstate==17
replace zikacases=53 if inputstate==18
replace zikacases=26 if inputstate==19
replace zikacases=22 if inputstate==20
replace zikacases=32 if inputstate==21
replace zikacases=39 if inputstate==22
replace zikacases=14 if inputstate==23
replace zikacases=131 if inputstate==24
replace zikacases=121 if inputstate==25
replace zikacases=68 if inputstate==26
replace zikacases=64 if inputstate==27
replace zikacases=25 if inputstate==28
replace zikacases=36 if inputstate==29
replace zikacases=9 if inputstate==30
replace zikacases=13 if inputstate==31
replace zikacases=22 if inputstate==32
replace zikacases=12 if inputstate==33
replace zikacases=180 if inputstate==34
replace zikacases=10 if inputstate==35
replace zikacases=1004 if inputstate==36
replace zikacases=91 if inputstate==37
replace zikacases=3 if inputstate==38
replace zikacases=85 if inputstate==39
replace zikacases=29 if inputstate==40
replace zikacases=47 if inputstate==41
replace zikacases=174 if inputstate==42
replace zikacases=54 if inputstate==44
replace zikacases=54 if inputstate==45
replace zikacases=2 if inputstate==46
replace zikacases=61 if inputstate==47
replace zikacases=312 if inputstate==48
replace zikacases=22 if inputstate==49
replace zikacases=11 if inputstate==50
replace zikacases=113 if inputstate==51
replace zikacases=70 if inputstate==53
replace zikacases=11 if inputstate==54
replace zikacases=50 if inputstate==55
replace zikacases=55 if inputstate==2
summarize zikacases
tabstat zikacases [aweight=weight], stats(mean sd semean min max n)

*CREATE GOOGLE TRENDS MEASURE BY STATE MEASURE (11/2016)
generate google=.
replace google=74 if inputstate==2
replace google=29 if inputstate==1
replace google=37 if inputstate==4
replace google=31 if inputstate==5
replace google=45 if inputstate==6
replace google=51 if inputstate==8
replace google=76 if inputstate==9
replace google=77 if inputstate==10
replace google=81 if inputstate==11
replace google=94 if inputstate==12
replace google=43 if inputstate==13
replace google=63 if inputstate==15
replace google=38 if inputstate==16
replace google=51 if inputstate==17
replace google=38 if inputstate==18
replace google=41 if inputstate==19
replace google=37 if inputstate==20
replace google=33 if inputstate==21
replace google=41 if inputstate==22
replace google=59 if inputstate==23
replace google=76 if inputstate==24
replace google=77 if inputstate==25
replace google=41 if inputstate==26
replace google=55 if inputstate==27
replace google=29 if inputstate==28
replace google=47 if inputstate==29
replace google=32 if inputstate==30
replace google=53 if inputstate==31
replace google=33 if inputstate==32
replace google=61 if inputstate==33
replace google=64 if inputstate==34
replace google=32 if inputstate==35
replace google=89 if inputstate==36
replace google=41 if inputstate==37
replace google=69 if inputstate==38
replace google=37 if inputstate==39
replace google=25 if inputstate==40
replace google=29 if inputstate==41
replace google=47 if inputstate==42
replace google=90 if inputstate==44
replace google=42 if inputstate==45
replace google=83 if inputstate==46
replace google=28 if inputstate==47
replace google=40 if inputstate==48
replace google=45 if inputstate==49
replace google=100 if inputstate==50
replace google=49 if inputstate==51
replace google=44 if inputstate==53
replace google=31 if inputstate==54
replace google=50 if inputstate==55
replace google=49 if inputstate==2
summarize google
tabstat google [aweight=weight], stats(mean sd semean min max n)
pwcorr google zikacases zikaconcern zikacount, sig

*DESCRIPTIVES ON MISTRUST IN GOVT
tabstat MIA342d [aweight=weight], stats(mean sd semean min max n)

*LOOK AT CORRELATION BETWEEN MISTURST OF GOV'T AND CONSP THOUGHT.
pwcorr consp_beliefs MIA342d, sig

*MODELING VARIATION IN OPINION
	*concern
oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
		*low consp thought
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
margins, at(consp_beliefs=0) atmeans post		
		*high consp thought 
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]		
margins, at(consp_beliefs=1) atmeans post
		*pid strong dem
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
margins, at(dem_rep=1) atmeans post		
		*pid strong rep
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]		
margins, at(dem_rep=7) atmeans post
		*female
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
margins, at(female=1) atmeans post		
		*male
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]		
margins, at(female=0) atmeans post
		*religious
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
margins, at(religious=4) atmeans post		
		*not religious
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]		
margins, at(religious=1) atmeans post
		*260 zika cases (mean)
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
margins, at(zikacases=260) atmeans post		
		*1083 zika cases (max)
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]		
margins, at(zikacases=1083) atmeans post
		*lowest gov trust
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
margins, at(MIA342d=5) atmeans post		
		*highest gov trust
quietly oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]		
margins, at(MIA342d=1) atmeans post		

	*possible causes (note: nbreg allows for fweights, iweights, and pweights, but not aweight)
		*vax
probit z_vac consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*low consp thought
quietly probit z_vac consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post		
			*high consp thought 
quietly probit z_vac consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]		
margins, at(consp_beliefs=1) atmeans post
		*GMM
probit z_gmm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*low consp thought
quietly probit z_gmm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post		
			*high consp thought 
quietly probit z_gmm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]		
margins, at(consp_beliefs=1) atmeans post
		*GOVT
probit z_govt consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*low consp thought
quietly probit z_govt consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post		
			*high consp thought 
quietly probit z_govt consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]	
margins, at(consp_beliefs=1) atmeans post		
		*OLY
probit z_oly consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*low consp thought
quietly probit z_oly consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post		
			*high consp thought 
quietly probit z_oly consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]	
margins, at(consp_beliefs=1) atmeans post
		*PHARM
probit z_pharm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*low consp thought
quietly probit z_pharm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post		
			*high consp thought 
quietly probit z_pharm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]	
margins, at(consp_beliefs=1) atmeans post
		*TERROR
probit z_terror consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*low consp thought
quietly probit z_terror consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post		
			*high consp thought 
quietly probit z_terror consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]	
margins, at(consp_beliefs=1) atmeans post
		*NONE
probit z_none consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
		*COUNT
nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
			*min consp belief
quietly nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=0) atmeans post
			*max consp belief
quietly nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(consp_beliefs=1) atmeans post
			*mean age (49, or bithyr 1968)
quietly nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(birthyr=1968) atmeans post
			*min age (18 or birthyear 1998)
quietly nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
margins, at(birthyr=1998) atmeans post

	*possible causes (note: nbreg allows for fweights, iweights, and pweights, but not aweight)
		*vax
probit z_vac consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]		
		*GMM
probit z_gmm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]		
		*GOVT
probit z_govt consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]		
		*OLY
probit z_oly consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]
		*PHARM
probit z_pharm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]
		*TERROR
probit z_terror consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]
		*NONE
probit z_none consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]
		*COUNT
nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d zikaconcern [pweight=weight]

*******

*ADDITIONAL ROBUSTNESS CHECKS

*looking for mulitcoliniarity in regressions (note: need to shift from non-linear models to linear regression to test viv)
	*col 1: concern
reg zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [aweight=weight]
vif
	*col 2: vax
reg z_vac consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif		
	*col 3: GMM
reg z_gmm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]	
vif	
	*col 4: GOVT
reg z_govt consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif		
	*col 5: *OLY
reg z_oly consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif
	*conl 6: PHARM
reg z_pharm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif
	*col 7: TERROR
reg z_terror consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif
	*col 8: NONE
reg z_none consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif
	*col 9: COUNT
reg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d [pweight=weight]
vif

*correlation between consp belief and "denialism" (all coded low to high, where high indicates more denial of official reports)
	*check data
tab MIA347a
tab MIA347b
tab MIA347c
tab MIA347d
	*deny anthropogenic climate change 
pwcorr consp_beliefs MIA347a [aweight=weight], sig	
	*deny official explanation of President Kennedy’s assassination
pwcorr consp_beliefs MIA347b [aweight=weight], sig		
	*deny official explanation of the 9/11 attacks 
pwcorr consp_beliefs MIA347c [aweight=weight], sig		
	*deny safety of genetically modified food
pwcorr consp_beliefs MIA347d [aweight=weight], sig	
	
*correlation between consp belief and other variables	
	*intent to vote in 2016 (CC16_364)
		*check data
tab CC16_364  		
		*recode: 1 = voted, 0 = no (or "not asked")
generate voted=.
replace voted=0 if CC16_401==1
replace voted=0 if CC16_401==2
replace voted=0 if CC16_401==3
replace voted=0 if CC16_401==4
replace voted=1 if CC16_401==5
tab CC16_401 voted
summarize voted
		*analysis
ttest consp_beliefs, by (voted)
		
	*accepting of violence against government
		*check variable
tab MIA344a
		*recode to run low acceptance of violence to high acceptance of violence
generate violence=.
replace violence=1 if MIA344a==5
replace violence=2 if MIA344a==4
replace violence=3 if MIA344a==3
replace violence=4 if MIA344a==2
replace violence=5 if MIA344a==1
tab MIA344a violence
		*analysis
pwcorr consp_beliefs violence [aweight=weight], sig	

*add attention to politics to regression for robustness check
	*check variable
tab newsint
	*flip scale for run low-high interest (note: coding "dk" as 1, akin to "hardly at all")
generate polint=.
replace polint=4 if newsint==1
replace polint=3 if newsint==2
replace polint=2 if newsint==3
replace polint=1 if newsint==4
replace polint=1 if newsint==7
tab newsint polint
	*replicate regressions
		*concern
oprobit zikaconcern consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [aweight=weight]		
		*vax
probit z_vac consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]		
		*GMM
probit z_gmm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]		
		*GOVT
probit z_govt consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]		
		*OLY
probit z_oly consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]
		*PHARM
probit z_pharm consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]
		*TERROR
probit z_terror consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]
		*NONE
probit z_none consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]
		*COUNT
nbreg zikacount consp_beliefs dem_rep educ kidsinfuture female birthyr religious noinsurance zikacases google MIA342d polint [pweight=weight]


****
****

*additional robustness analyses for palgrave r&r

*re-create the original DV
	*COUNT OF PERCEIVED CAUSES
		*recode to 0 = no 1 = yes
			*vaccines
generate z_vac=.
replace z_vac=1 if MIA440_1==1
replace z_vac=0 if MIA440_1==2
			*GMMs
generate z_gmm=.
replace z_gmm=1 if MIA440_2==1
replace z_gmm=0 if MIA440_2==2
			*government
generate z_govt=.
replace z_govt=1 if MIA440_3==1
replace z_govt=0 if MIA440_3==2
			*olympics
generate z_oly=.
replace z_oly=1 if MIA440_4==1
replace z_oly=0 if MIA440_4==2
			*big pharama
generate z_pharm=.
replace z_pharm=1 if MIA440_5==1
replace z_pharm=0 if MIA440_5==2
			*terrorists
generate z_terror=.
replace z_terror=1 if MIA440_6==1
replace z_terror=0 if MIA440_6==2
			*none of the above
generate z_none=.
replace z_none=1 if MIA440_7==1
replace z_none=0 if MIA440_7==2
	
		*summary
summarize z_vac z_gmm z_govt z_oly z_pharm z_terror z_none  [aweight=weight]

		*total count variable
generate zikacount=0
replace zikacount=z_vac+z_gmm+z_govt+z_oly+z_pharm+z_terror
tab zikacount [aweight=weight]
summarize zikacount [aweight=weight]

*now, distill the 439 series into a count for 1 = yes gov't should do it, 0 = all else, and sum it
	*a: educate
generate educate=0
replace educate=1 if MIA439a_1==1 | MIA439a_2==1 | MIA439a_3==1
tab educate 
  
	*b: insecticides to kill mosquitos				
generate chems=0
replace chems=1 if MIA439b_1==1 | MIA439b_2==1 | MIA439b_3==1
tab chems
					  
	*c: standaing water fines
generate fines=0
replace fines=1 if MIA439c_1==1 | MIA439c_2==1 | MIA439c_3==1
tab fines
					  
	*d: delay pregnancy
generate preg=0
replace preg=1 if MIA439d_1==1 | MIA439d_2==1 | MIA439d_3==1
tab preg
					  
	*e: travel warnings
generate warn=0
replace warn=1 if MIA439e_1==1 | MIA439e_2==1 | MIA439e_3==1
tab warn
					  
	*f: fund science				  
generate fund=0
replace fund=1 if MIA439f_1==1 | MIA439f_2==1 | MIA439f_3==1
tab fund
					  
	*g: GMMs
generate use_GMM=0
replace use_GMM=1 if MIA439g_1==1 | MIA439g_2==1 | MIA439g_3==1
tab use_GMM

	*generate count
generate yes_gov=.
replace yes_gov=educate+chems+fines+preg+warn+fund+use_GMM
tab yes_gov

	*correlate consp beliefs on zika with willingness to use gov counts
pwcorr yes_gov zikacount [aweight=weight], sig	
		*robustness checks for palgrave R&R (n.s.)
poisson yes_gov zikacount [pweight=weight]
poisson yes_gov zikacount
spearman yes_gov zikacount

	*generate descriptive statistics for R2 on age
mean birthyr

		
	
	
	
		
		

